package club.limeyu.ngixnslb.controller;

import club.limeyu.ngixnslb.conf.ArticleConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author liangmy
 * @Description:
 * @Create: 2021/1/22 下午1:16
 */
@RestController
@RequestMapping(value = "/hello")
public class HelloController {

    @Autowired
    private ArticleConfiguration articleConfiguration;

    int request_times = 1;

    @GetMapping(value = "/whoIam")
    public String whoIam() {
        return articleConfiguration.getWhoIam() + " 第 " + (request_times++) + " 次访问";
    }
}
